/**
 * 
 */
package nezumi.gui;

import java.awt.Component;
import java.awt.Graphics2D;
import java.awt.Point;

import nezumi.state.State;

/**
 * @author rui
 * 
 */
public class TargetEntity extends ASpriteEntity {

	/**
	 * @param spriteRef
	 * @param state
	 */
	public TargetEntity(String spriteRef, State state, Component enclosingComp) {
		super(spriteRef, state, enclosingComp);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see nezumi.gui.ASpriteEntity#getLocation()
	 */
	@Override
	protected Point getLocation() {
		return state.getPlanner().getCurrTarget();
	}

	@Override
	public void draw(Graphics2D g) {
		Point loc = this.translatePoint(getLocation());
		sprite.drawCentered(g, loc.x, loc.y);
	}
}
